﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Foundation.ObjectHydrator.Interfaces;

namespace Foundation.ObjectHydrator.Generators
{
    public class ListGenerator:IGenerator
    {
        Random random;
        IEnumerable<object> objects = new List<object>();
        public ListGenerator(IEnumerable<object> list)
        {
            random = new Random();
            objects = list;
        }

        public object Generate()
        {
            return objects.ElementAt(random.Next(0, objects.Count<object>()));
        }
    }
}
